package com.yswy.domain.vo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Calendar;
import java.util.Date;

/**
 * 过滤基类
 *
 * @author 周林
 * @version 1.0
 */
@Data
public class DataBaseFilter extends BaseFilter {
    @ApiModelProperty("开始时间")
    private Date staTime;
    @ApiModelProperty("结束时间")
    private Date endTime;

    public Date getEndTime() {
        return null == endTime ? null : addTime(endTime);
    }
    private Date addTime(Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        calendar.add(Calendar.DATE, 1);
        return calendar.getTime();
    }

}
